﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace MvcShop.Models
{
    [MetadataType(typeof(RoleMetadata))]
    public partial class Role
    { 
    }

    public class RoleMetadata
    {
        [Required(ErrorMessage = "角色名称必填")]
        [StringLength(50, ErrorMessage = "角色名称不能超过50字节")]
        [DisplayName("角色名称")]
        public string RolesName { get; set; }

        [StringLength(50,ErrorMessage="角色描述不能超过50字节")]
        [DisplayName("角色名称")]
        public string Description { get; set; }
    }
}
